package com.csap.framework.boot.apidoc.autoconfigure;

import com.csap.framework.apidoc.web.CsapDocController;
import org.springframework.boot.context.event.ApplicationReadyEvent;
import org.springframework.context.ApplicationListener;

/**
 * 运行初始化文档信息
 *
 * @author yangchengfu
 * @date 2021/1/27 10:18 上午
 **/
public class RunApplicationListener implements ApplicationListener<ApplicationReadyEvent> {
    @Override
    public void onApplicationEvent(ApplicationReadyEvent event) {
        event.getApplicationContext().getBean(CsapDocController.class).apidoc(Boolean.TRUE);
    }
}
